package com.kaussoft.lolblog.dao;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

public interface BaseDAO {
	public Object load(Class clazz, Serializable id);
	public Object loadInitialize(Class clazz, Serializable id);
	public List loadAll(Class clazz);
	public Object get(Class clazz, Serializable id);
	public Object getInitialize(Class clazz, Serializable id);
	public void save(Object obj);
	public void saveOrUpdate(Object obj);
	public void saveOrUpdateAll(Collection collection);
	public void update(Object obj);
	public void merge(Object obj);
	public void refresh(Object obj);
	public void delete(Object obj);
	public void deleteAll(Collection collection);
	
	public Object findObjectByHql(String hql);
	public Object findObjectByHql(String hql, Object value);
	public Object findObjectByHql(String hql, Object[] values);
	
	public List findListByHql(String hql);
	public List findListByHql(String hql, Object value);
	public List findListByHql(String hql, Object[] values);
}
